using System;
using BangBangHell;
using GGameFramework.Event;
using QFramework;
using Sirenix.OdinInspector;
using UnityEngine;

namespace BangBangHell
{
    public class PlayerWeapon : MonoBehaviour
    {
        [SerializeField]
        private GameEvent<int> _intEvent;

        [SerializeField]
        private GameEvent<float> _floatEvent;
        
        
        [Button("射击-int")]
        public void ShootInt() {
            if (_intEvent != null)
            {
                _intEvent.Raise(1);
            }
        }
        [Button("射击—Float")]
        public void ShootFloat() {
            if (_intEvent != null)
            {
                _floatEvent.Raise(2.5f);
            }
        }
        [Button("射击—Type Send")]
        public void TypeEventSend()
        {

            GameEntry.Event.Send(new Event_Test()
            {
                Source = 10,
            });
        }
        
        // public IntGameEvent PlayerComboSO;
        //
        // [Button("射击")]
        // public void Shoot()
        // {
        //     int rand = Random.Range(1, 2);
        //     PlayerComboSO.Raise(rand);
        //     Debug.Log($"射击加:{rand}分");
        // }
        public void OnCustomAwake()
        {
           
        }
    }

}
